package cn.yl.user.server.entity;

import cn.yl.api.server.entity.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @author yl
 * @since 2022-04-22
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("user")
@ApiModel(value = "User对象", description = "用户表")
public class User extends BaseEntity {

    private static final long serialVersionUID = 1L;


    @ApiModelProperty("用户昵称")
    @TableField("name")
    private String name;

    @ApiModelProperty("盐")
    @TableField("salt")
    private String salt;

    @ApiModelProperty("用户头像地址")
    @TableField("portrait")
    private String portrait;

    @ApiModelProperty("注册手机")
    @TableField("phone")
    private String phone;

    @ApiModelProperty("用户密码（可以为空，支持只用验证码注册、登录）")
    @TableField("password")
    private String password;

    @ApiModelProperty("注册ip")
    @TableField("reg_ip")
    private String regIp;

    @ApiModelProperty("是否有效用户")
    @TableField("account_non_expired")
    private Boolean accountNonExpired;

    @ApiModelProperty("账号是否未过期")
    @TableField("credentials_non_expired")
    private Boolean credentialsNonExpired;

    @ApiModelProperty("是否未锁定")
    @TableField("account_non_locked")
    private Boolean accountNonLocked;

    @ApiModelProperty("用户状态：ENABLE能登录，DISABLE不能登录")
    @TableField("status")
    private String status;

    @ApiModelProperty("是否删除")
    @TableField("is_del")
    @TableLogic
    private Boolean del;


}
